﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _23_C_中Hashtable以及取值顺序问题
{
    internal class MyHashtable : Hashtable
    {
        private ArrayList _arry = new ArrayList();

        public override ICollection Keys
        {
            get { return _arry; }
        }
        public void Sort()
        {
            _arry.Sort();
        }

        public override void Add(object key, object? value)
        {
            base.Add(key, value);
            _arry.Add(key);
        }
    }
}
